<template>
  <view class="index">

    <view class=''>订单详情</view>

  </view>
</template>

<script>
import "./orderDetail.less";
import OrderList from "@/components/orderList/orderList.vue";
import Tabbar from "@/components/TabBar.vue";
import LiboItem from "@/components/liboItem";
import { getOrderInfo } from "/src/service/apis/order";
import { AtTabs, AtTabsPane } from "taro-ui-vue";
import { reactive, ref, onMounted, toRefs } from "vue";

import Taro, {getCurrentInstance} from '@tarojs/taro'
export default {
  name: "libo",
  setup() {
    const state = reactive({
      params: {
        mode: 2,  //    2 接单  1 发布
        status: 0, //订单状态
      },
      order_list: [],
    });

    //获取数据
    async function getData() {
      const  params = getCurrentInstance().router.params
      
      //获取订单数据
      let { data } = await getOrderInfo(params);
      state.order_list = data.data;
    }
    onMounted(() => {
      state.order_list = []
      getData();
    });

    return {
      ...toRefs(state),

      getData,
    };
  },
  components: {
    Tabbar,
    OrderList,
  },
};
</script>